﻿using System;
using Microsoft.TeamFoundation.VersionControl.Client;

namespace TfsGiggle.Core.Tfs.Implementation
{
    class ChangeImpl : IChange
    {
        private Lazy<IItem> _item;
        private Change _change;

        private IItem CreateItemImpl()
        {
            throw new NotImplementedException();
        }

        public ChangeImpl(IVersionControlServer versionControlServer, Change change)
        {
            _change = change;
            _item = new Lazy<IItem>(() => 
            {
                return new ItemImpl(versionControlServer, change.Item);
            });
        }

        public IItem Item
        {
            get { return _item.Value; }
        }

        public ChangeType ChangeType
        {
            get { return _change.ChangeType; }
        }
    }
}
